package com.yuntsg.nnsfcp.test.pdf.asposepdf.examples.AsposePdfExamples.Images;

import com.aspose.pdf.Document;
import com.aspose.pdf.XImage;

import java.io.IOException;

public class ExtractImageProperties {

    public static void main(String[] args) throws IOException {
        Document documet = new Document("page-0000000004.pdf");
        for (XImage image : documet.getPages().get_Item(1).getResources().getImages()) {
            XImage.RawParameters rawParameters = image.getRawParameters();
            System.out.println(rawParameters.getType());
            System.out.println(rawParameters.getName());
            System.out.println(rawParameters.getBitsPerComponent());
            System.out.println(rawParameters.getDecodeParms());
            System.out.println(rawParameters.getFilter());
            System.out.println(rawParameters.getHeight());
            System.out.println(rawParameters.getWidth());
            System.out.println(rawParameters.getLength());
            System.out.println(image.toString());
        }
    }
}
